• 2024-05-20
  • unique

CoreOS systemd mount

cd /etc/systemd/system
vi $(systemd-escape -p --suffix=mount "/var/mnt/storage-pub")
[Unit]
Description=storage root

[Mount]
What=/dev/disk/by-label/storage
Where=/var/mnt/storage-root
Type=btrfs
Options=rw,noatime,nofail,subvolid=5

[Install]
WantedBy=multi-user.target
[Unit]
Description=storage pub

[Mount]
What=/dev/disk/by-label/storage
Where=/var/mnt/storage-pub
Type=btrfs
Options=rw,noatime,nofail,subvol=@pub

[Install]
WantedBy=multi-user.target
systemctl enable --now var-mnt-storage\\x2droot.mount